package com.itheima.domain;

import org.springframework.stereotype.Component;

@Component//注解加了之后是否生效取决于spring有没有扫到这个注解
            //默认使用类名的首字母小写作为id,比如这次的user

/*@Service    业务层   这是@Component衍生出来的三个注解
@Repository   持久层   主要是细化分别使用在哪个层上,
@Controller   表现层   当然如果直接用@Component也是没问题的
*/

//@Scope   设置作用范围

public class User {
    private String number;
    private String username;
    private String password;
    private String sex;
    private Integer age;
    private String email;

    public User() {
    }

    public User(String number, String username, String password, String sex, Integer age, String email) {
        this.number = number;
        this.username = username;
        this.password = password;
        this.sex = sex;
        this.age = age;
        this.email = email;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" +
                "number='" + number + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", email='" + email + '\'' +
                '}';
    }
}
